#pragma once

/* 当前会话的3个进度：连接、协商、完成协商。 */
enum SOCKS_STEP {
    ess_connected,
    ess_authentica,
    ess_authed
};

enum SOCKS_ERROR {
    ese_success,
    ese_socket_recv_error,
    ese_buf_too_small,
    ese_wrong_ver,
    ese_wrong_length,
    ese_no_authorization_method_avalible,
    ese_send_authorization_method_failed,
    ese_wrong_auth_ver,
    ese_invalid_data,
    ese_authorize_failed,
    ese_cmd_not_support,
};


/**
 * @brief The MethodSelection enum
 * Authorization type.
 */
enum MethodSelection
{
    ms_no_authentiacion_required,
    ms_gssapi,
    ms_password,
    ms_no_acceptble_methods = 0xff
};

enum CONNECTErrorCode {
    EC_SUCCESS = 0,
    EC_GENERAL_FAILURE = 1,
    EC_NOT_ALLOWED = 2,
    EC_NET_UNREACHABLE = 3,
    EC_HOST_UNREACHABLE = 4,
    EC_CONN_REFUSED = 5,
    EC_TTL_EXPIRED = 6,
    EC_COMMAND_NOT_SUPPORTED = 7,
    EC_ADDRESSTYPE_NOT_SUPPORTED = 8,
};


enum AuthorizationMode{
    EAM_Unknown,
    EAM_None,
    EAM_Password,
};
